home *** CD-ROM | disk | FTP | other *** search
- Path: munta.cs.mu.OZ.AU!trb
- From: trb@munta.cs.mu.OZ.AU (Timothy Robin BARBOUR)
- Newsgroups: comp.lang.c++
- Subject: g++ exception handling - help!
- Date: 10 Mar 1996 00:33:36 GMT
- Organization: Comp Sci, University of Melbourne
- Message-ID: <4ht810$cp8@mulga.cs.mu.OZ.AU>
- NNTP-Posting-Host: munta.cs.mu.oz.au
- Summary: turning on exception handling in g++ gives me link errors
- Keywords: g++, exceptions
-
- I am using g++ 2.7.2 with ld 2.5.2.6 on a Linux 586-a.out box. When I turn on
- exception handling using the flag -fhandle-exceptions, I get link errors. These
- are of two kinds: undefined references to terminate(void) (which I fixed by
- defining terminate, although surely it should be a standard function) and the
- following:
-
- ioserror.cpp(.text+0xf50): undefined reference to `L2657'
- ioserror.cpp(.text+0xf54): undefined reference to `L2658'
- ioserror.cpp(.text+0xf58): undefined reference to `L2659'
- starray.ti(.text+0xbcf4): undefined reference to `L12851
- starray.ti(.text+0xbcf8): undefined reference to `L12852'
- starray.ti(.text+0xbcfc): undefined reference to `L12853
- starray.ti(.text+0xbd00): undefined reference to `L13339
-
- + lots more...
-
- (the .ti files are for template instantiation, think of them as .cpp).
-
- The above problem occurs for a program with about 10 small compilation units. I
- have been able to successfully throw and catch exceptions in a test program
- consisting of a *single compilation unit* (by defining terminate()).
-
- The gcc info does not have any mention of exception handling (that I was able
- to find). Is there a special library that needs linking to support it ? BTW the
- places where the linker was complaining don't actually define or throw any
- exceptions.
-
- Any help would be greatly appreciated.
-
-
-